package com.etc.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.etc.entity.Blog;
import com.etc.service.BlogService;

@RestController
@CrossOrigin(origins = "*")
public class BlogController {
	
	@Autowired
	private BlogService blogService;

	@GetMapping(value = "/blog/{blogid}")
	public Blog getIpInfo(@PathVariable("blogid") Integer blogid) throws Exception {		
		return blogService.selectBlog(blogid);
		
	}
	

}
